<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: abspos exactly at the clamp point is visible</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
<link rel="match" href="reference/line-clamp-auto-026-ref.html">
<meta name="assert" content="The chosen clamp point with line-clamp: auto is the last one where the box size doesn't overflow. Since non-inline abspos have a clamp point after them, and they don't take up any space in the container, an abspos right at the boundary should be visible. If there's bottom padding in a container box, that counts as effectively shrinking the boundary.">
<style>
.clamp {
  line-clamp: auto;
  max-height: calc(4lh + 2 * 2px);
  font: 16px / 32px serif;
  background-color: yellow;
}
.padding {
  padding: 2px;
}
.inner {
  white-space: pre-wrap;
}
.abspos {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: skyblue;
}
</style>

<div class="clamp">
<div class="padding">
<div class="inner">Line 1
Line 2
Line 3
Line 4
</div>
<div class="abspos"></div>
<div class="inner">Line 5
Line 6</div>
</div>
</div>
